package com.oliver.proxy.midjourney.infrastructure.mapper;

import com.oliver.proxy.midjourney.domain.entity.FinalProd;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FinalProdMapper {
    @Insert("INSERT INTO final_prod (final_ext_code) VALUES (#{finalExtCode})")
    void insert(FinalProd finalProd);

    @Insert("<script>" +
            "INSERT INTO final_prod (final_ext_code) VALUES " +
            "<foreach collection='codes' item='code' separator=','>" +
            "(#{code})" +
            "</foreach>" +
            "</script>")
    void batchInsert(@Param("codes") List<String> finalExtCodes);
} 